package com.changfen;

import com.changfen.config.JacksonFeignConfiguration;
import com.changfen.domain.Student;
import com.changfen.domain.User;
import feign.Param;
import feign.RequestLine;
import org.springframework.cloud.openfeign.FeignClient;

import java.util.List;

/**
 * @author changfeng.chen
 * @date 2021/5/13
 * Email: changfeng.chen@things-matrix.com
 */
//@FeignClient(name = "eureka-student", configuration = JacksonFeignConfiguration.class)
public interface StudentProvider {
    @RequestLine("GET /student/findAll")
    List<Student> findAll();

    @RequestLine("GET /user/getById/{id}")
    Student findById(@Param("id") String id);

    @RequestLine("POST /student/userAndStudent")
    Student userAndStudent(@Param("student") Student student, @Param("user") User user);
}

